<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <title>定位</title>
</head>
<body>
    <style>
        .wrapper,.content {
            width: 100px;
            height: 100px;
        }

        .wrapper {
            background-color: red;
            /*absolute 相对中的绝对定位*/
            /*position: absolute;*/
            /*left: -50px;*/
            /*top: 0;*/
            margin-top: 100px;
            position: relative;
        }

        .content {
            background-color: blue;
            /*position: absolute;*/
            /*left: 100px;*/
            /*top: 0;*/

            /*position: relative;*/
            /*left: 100%;*/
            /*top: 100%;*/

            position: relative;
            left: 50%;
            top: -50%;
            border-radius: 50px;
            text-align: center;
            line-height: 100px;
            color: white;
        }

    </style>
    <div class="wrapper">
        <div class="content">
            10
        </div>
    </div>
    <p style="background-color:yellow;">这是绝对路径带来的副作用</p>
<!--父相子绝   父元素相对定位  子元素绝对定位-->
</body>
</html>